<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button type="button" onclick="alert('欢迎!')">点击此处!</button>
    <h1>我是网页a</h1>
    <button type="button" onclick="alert('欢迎！')">点击！</button>

    <p id='a'>
        我是a
        <br> 我能改变html的内容
    </p>


    <script>
        function find() {
            x = document.getElementById("a") //查找元素a
            x.innerHTML = "我是网页a";
        }
    </script>
    <button type="button" onclick="find()">点击查找</button>

    <p>请输入一个字段</p>
    <input id="input01" type="text">
    <script>
        function isNan_() {
            var x = document.getElementById("input01").value;
            if (x == "" || isNaN(x)) {
                alert("不为数字");
            } else {
                alert("为数字");
            }
        }
    </script>
    <button type="button" onclick="isNan_()">提交</button>
</body>

</html>